//
const express = require('express');

const app = express();
//定义局部中间件

const nw = function (req, res, next) {
    console.log('这是局部的中间件处理函数');
    next();
}
const nw2 = function (req, res, next) {
    console.log('2');
    next();
}
app.use(express.urlencoded({ extended: false }))
app.get('/user', nw, nw2, (req, res) => {
    res.send('userget');
})
app.post('/user', (req, res) => {
    res.send(req.body.a);
})
//
app.listen(89, () => {
    console.log('http://127.0.0.1:89');

})

